package com.zone.domain.acticity.model.entity;

import lombok.Data;

import java.util.Date;

/**
 * @author: zongzi
 * @description: 抽奖活动账户
 * @date: 2024/6/23
 */
@Data
public class RaffleActivityAccountEntity {
    // 默认空账户对象
    public static RaffleActivityAccountEntity EMPTY_ACCOUNT;

    static {
        EMPTY_ACCOUNT = new RaffleActivityAccountEntity();
        EMPTY_ACCOUNT.setTotalCount(0);
        EMPTY_ACCOUNT.setTotalCountSurplus(0);
        EMPTY_ACCOUNT.setMonthCount(0);
        EMPTY_ACCOUNT.setMonthCountSurplus(0);
        EMPTY_ACCOUNT.setDayCount(0);
        EMPTY_ACCOUNT.setDayCountSurplus(0);
    }

    /** 用户ID */
    private String userId;
    /** 活动ID */
    private Long activityId;
    /** 总次数 */
    private Integer totalCount;
    /** 总次数-剩余 */
    private Integer totalCountSurplus;
    /** 日次数 */
    private Integer dayCount;
    /** 日次数-剩余 */
    private Integer dayCountSurplus;
    /** 月次数 */
    private Integer monthCount;
    /** 月次数-剩余 */
    private Integer monthCountSurplus;
    /** 创建时间 */
    private Date createTime;
    /** 更新时间 */
    private Date updateTime;

    public Integer getTotalPartakeCount() {
        return this.totalCount - this.totalCountSurplus;
    }
}
